define(['require', 'common/util/fileurl', 'common/util/string'],
       function(require, fileurl, string) {

function isTestFile(filepath) {
  if (fileurl.isChild('../hello/', filepath)) {
    return false;
  }
  return string.endsWith(filepath, '_test.js');
};

function requireTests(filepaths) {
  function getModuleName(filepath) {
    var pathRelativeToJsRoot = fileurl.relativePath('../', filepath);
    return string.removeSuffix(pathRelativeToJsRoot, '.js');
  }
  require(filepaths.map(getModuleName));
};

fileurl.findFiles('../', isTestFile, requireTests);

// require(['common/geometry/geometry2d_test']);

});
